package com.vishnu.core.innerclasspractice;

public class Outer2 {

	//accessing inner class from static area of outer class.
	
	public class Inner{
		public void m1(){
			
			System.out.println("-----------------we are in m1() method of inner class");
		}
	}
	
	public void outerClassMethod(){
		System.out.println("-------this is outer class instance method i.e outerClassMethod()");
		Outer2 o=new Outer2();
		Inner i=o.new Inner();
//		Inner i=new Inner();
		i.m1();
	}
	
	public static void main(String[] args) {
/*		Outer2 o=new Outer2();
		Inner i=o.new Inner();
		o.outerClassMethod();*/
		Inner i=new Outer2().new Inner();
	}
	
	
}
